package org.yaaic.gps_utils;

import org.yaaic.model.Channel;

public class SortChannelObj implements Comparable<SortChannelObj>
{

    private double score;
    private final Channel chan;


    public SortChannelObj(double score, Channel chan)
    {
        super();
        this.score = score;
        this.chan = chan;
    }

    public double getScore()
    {
        return score;
    }

    public Channel getChan()
    {
        return chan;
    }

    public void setScore(double nScore){
        score = nScore;
    }


    @Override
    public int compareTo(SortChannelObj another)
    {
        if( this.score > another.score){
            return 1;
        }
        else if(this.score < another.score){
            return -1;
        }
        return 0;
    }

}
